#!/usr/bin/python3
# -*- coding: utf-8 -*-

import yaml
import os
BASE_DIR = os.path.abspath(os.path.dirname((os.path.dirname(__file__))))
config_path = os.path.join(BASE_DIR, 'config/website.yaml')

config = {}


def get_config(env='pro'):
    with open(config_path) as f:
        global config
        conf = yaml.safe_load(f)[env]
        config = dict(config, **conf)


def set_config(conf):
    global config
    config = dict(config, **conf)


get_config()
